projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f606c65
)
python/xc: fix out of bounds array access
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 15 Jun 2010 12:27:14 +0000
(13:27 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 15 Jun 2010 12:27:14 +0000
(13:27 +0100)
Writing a NUL terminator here isn't even necessary, since snprintf()
already guarantees proper termination.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/python/xen/lowlevel/xc/xc.c
patch
|
blob
|
history
diff --git
a/tools/python/xen/lowlevel/xc/xc.c
b/tools/python/xen/lowlevel/xc/xc.c
index 7330191ebd70f53d4eed62f1788c733f52f355e0..a7286c4e85270ffcfab77150e82d8b74f02cd411 100644
(file)
--- a/
tools/python/xen/lowlevel/xc/xc.c
+++ b/
tools/python/xen/lowlevel/xc/xc.c
@@
-58,7
+58,6
@@
static PyObject *pyxc_error_to_exception(xc_interface *xch)
snprintf(err_buf.message, sizeof(err_buf.message),
"xc_interface_open failed: %s",
strerror(errno));
- err_buf.message[sizeof(err_buf)-1] = 0;
err_buf.code = XC_INTERNAL_ERROR;
err = &err_buf;
}